package com.pactera.madp.cp.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Description  企业通讯录
 */

@Data
@TableName("cp_work_employee" )
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "企业员工信息")
public class WorkEmployeeEntity  extends BaseEntity<WorkEmployeeEntity> implements Cloneable{

	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	/**
	 * wx.userId
	 */
	private String wxUserId;

	/**
	 * 所属企业corpid（cp_corp.id）
	 */
	@NotNull(message = "企业ID不能为空")
	@ApiModelProperty(value = "企业id")
	private Integer corpId;

	@ApiModelProperty(value = "名称")
	private String name;

	@ApiModelProperty(value = "手机号")
	private String mobile;

	@ApiModelProperty(value = "职位信息")
	private String position;

	@ApiModelProperty(value = "性别。0表示未定义，1表示男性，2表示女性")
	private Integer gender;

	@ApiModelProperty(value = "邮箱")
	private String email;

	@ApiModelProperty(value = "头像url")
	private String avatar;

	@ApiModelProperty(value = "头像缩略图")
	private String thumbAvatar;

	@ApiModelProperty(value = "座机")
	private String telephone;

	@ApiModelProperty(value = "别名")
	private String alias;

	@ApiModelProperty(value = "扩展属性")
	private String extattr;

	@ApiModelProperty(value = "激活状态: 1=已激活，2=已禁用，4=未激活，5=退出企业")
	private Integer status;

	@ApiModelProperty(value = "员工二维码")
	private String qrCode;

	@ApiModelProperty(value = "员工对外属性")
	private String externalProfile;

	@ApiModelProperty(value = "员工对外职位")
	private String externalPosition;

	@ApiModelProperty(value = "地址")
	private String address;

	@ApiModelProperty(value = "全局唯一id")
	private String openUserId;

	@ApiModelProperty(value = "微信端主部门id")
	private Integer wxMainDepartmentId;

	/**
	 * 主部门id(cp_work_department.id)
	 */
	@ApiModelProperty(value = "主部门id")
	private Integer mainDepartmentId;

	/**
	 * 子账户ID(sys_user.id)
	 */
	@ApiModelProperty(value = "子账户id")
	private Integer logUserId;

	@ApiModelProperty(value = "是否配置外部联系人权限（1.是 2.否）")
	private Integer contactAuth;
//
//	@ApiModelProperty(value = "员工自动上下线状态值（在线为0 下线为1 默认为0）")
//	private Integer automaticOnlineAndOfflineStatus;

	@Override
	public WorkEmployeeEntity clone() {
		try {
			return (WorkEmployeeEntity) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return null;
	}
}
